package thread;

import java.util.Arrays;

public class ThreadInfoDemo {
    public static void main(String[] args) {

        Thread main = Thread.currentThread();

        String name = main.getName();
        System.out.println("名字："+name);
        System.out.println("唯一标识："+main.getId());

        int priority = main.getPriority();  //  线程优先级，默认都是5
        System.out.println("优先级："+priority);

        System.out.println(main.isAlive());
        System.out.println(main.isDaemon());
        System.out.println(main.isInterrupted());

        main.setPriority(4);
        System.out.println(main.getPriority());

    }
}
